package com.classbook.violet.baigiang.singleton;

import java.io.File;

import com.classbook.violet.baigiang.subject.SubjectParser;

import android.os.Environment;
import android.util.Log;

public class MySingleton {
	private static MySingleton instance;
	public SubjectParser mParser;
	public String xml_name;
	public String root_name;

	public static void initInstance() {
		if (instance == null) {
			// Create the instance
			instance = new MySingleton();
		}
	}

	public static MySingleton getInstance() {
		// Return the instance
		return instance;
	}


	private MySingleton() {
		// Constructor hidden because this is a singleton
	}

	public void customSingletonMethod() {
		// Custom method
		Log.i("", "customSingletonMethod");
		xml_name = "EDC_Library_7.xml";
		root_name = "THCS/";
		File root = new File(Environment.getExternalStorageDirectory().getPath()
				+ "/EDC/Violet/");
		if (!root.exists()){
			root.mkdirs();
		}
	}
}
